package priv.yiyuan.example.composite.ticket;

/**
 * IT经理
 *
 * 具体处理者
 *
 * @author YiYuan
 * @data 2025/8/29
 * @apoNote
 */
public class ITManager implements TicketHandler {

    private String name;

    private TicketHandler nextHandler;

    public ITManager(String name) {
        this.name = name;
    }

    @Override
    public void setNextHandler(TicketHandler nextHandler) {
        this.nextHandler = nextHandler;
    }

    @Override
    public boolean handleTicket(TicketComponent ticket) {
        System.out.println("IT经理 " + name + " 正在处理工单: " + ticket.description);
        ticket.updateStatus(TicketStatus.COMPLETED);
        return true;
    }
}
